	function loadfooter(allTotal){
		var page = $("#pagenum").val();
		var size = 10;
		var from,to ;
		from = (page-1)*size+1;
		to = from +size-1;
		if(to-allTotal>=0) to=allTotal;
		pages= Math.ceil(allTotal/size);
		 
		 if(page==1){
			 $("#previous").addClass("disabled");
			 $("#next").removeClass("disabled");
		 }
		 else if(page>1 && page<pages){
			 $("#previous").removeClass("disabled");
			 $("#next").removeClass("disabled");
		 }else if(page==pages){
			 $("#previous").removeClass("disabled");
			 $("#next").addClass("disabled");
		 }
		 
		 $("#foot_info").html("Showing "+from+" to "+to+" of "+allTotal+" records");
		 $("#pages").html(pages);
		 
		$("#previous").click(function(){
			if(page>1) {
				page = page*1-1;
				$("#pagenum").val(page);
				loaddata();
			}
		});
		
		$("#next").click(function(){
			if(page<pages) {
				page = page*1+1;
				$("#pagenum").val(page);
				loaddata();
			}
		});
		$("#pagenum").change(function() { 
			loaddata();
		});
	}
	function load(url,params){
		var obj = "";
		$.ajax({  
	        type : "post",  
	        url : url,  
	        data : params,
	        dataType : "json", 
	        async : false,  //同步
	        success : function(data){  
	           data = eval(data);  
		   		if (data.err_msg=="success") {
					$.each(data.result, function(index, list) {
						allTotal = list.allTotal;
						loadfooter(allTotal);
						obj = list;
					});
				}
				else {
					alert(data.err_code);
					obj = "";
				}
	        }  
	    });
		return obj;
	}
	
	function getFabOperation(url,category){
		var obj = "";
		var params = {category:category};
		$.ajax({  
	        type : "post",  
	        url : url,  
	        data : params,
	        dataType : "json", 
	        async : false,  //同步
	        success : function(data){  
	           data = eval(data);  
		   		if (data.err_msg=="success") {
					obj = data.LcmOperation;
				}
				else {
					alert(data.err_code);
					obj = "";
				}
	        }  
	    });
		return obj;
	}

